#include "../include/CShotPowerUpBehaviour.h"
#include "../include/CPlayerBehaviour.h"

//**************************
//Description : Constructor
//Parameters : Value for m_iX, m_iY,
//              m_iSpeedX, m_iSpeedY,
//              m_iWidth, m_Height,
//              the ratio for the collision box
//              m_iNbPoints
//Note : None
//**************************
CShotPowerUpBehaviour::CShotPowerUpBehaviour(int _iX, int _iY,
                        int _iSpeedX, int _iSpeedY,
                        int _iWidth, int _iHeight,
                        float _fRatioW, float _fRatioH,
                        int _iNbPoints,
                        int _iTypeShotBonus)
    : CDefaultPowerUpBehaviour(_iX, _iY,
                                _iSpeedX, _iSpeedY,
                                _iWidth, _iHeight,
                                _fRatioW, _fRatioH,
                                _iNbPoints),
    m_iTypeShotBonus(_iTypeShotBonus)
{
}

//**************************
//Description : Copy Constructor
//Parameters : A CDefaultPowerUpBehaviour
//Note : None
//**************************
CShotPowerUpBehaviour::CShotPowerUpBehaviour(CShotPowerUpBehaviour & _ShotPowerUp)
    : CDefaultPowerUpBehaviour(_ShotPowerUp),
    m_iTypeShotBonus(_ShotPowerUp.m_iTypeShotBonus)
{
}

//**************************
//Description : Destructor
//Parameters : None
//Note : None
//**************************
CShotPowerUpBehaviour::~CShotPowerUpBehaviour()
{
}

//**************************
//Description : Set m_iTypeShotBonus
//Parameters : The new value for m_iTypeShotBonus
//Return Value : None
//Note : None
//**************************
void CShotPowerUpBehaviour::SetTypeShotBonus(int _iTypeShotBonus)
{
    m_iTypeShotBonus = _iTypeShotBonus;
}

//**************************
//Description : Give a bonus (add life, new shot, etc...) to the entity
//Parameters : The entity which gain the bonus
//Return Value : None
//Note : None
//**************************
void CShotPowerUpBehaviour::GiveBonus(CPlayerBehaviour * _Player)
{
    _Player->ShotsUp(m_iTypeShotBonus);
    _Player->AddPoints(m_iNbPoints);
}

//**************************
//Description : Update the trajectory of the entity
//Parameters : None
//Return Value : None
//Note : None
//**************************
void CShotPowerUpBehaviour::EntityTrajectory()
{
    m_iY++;
}
